package org.hard.netty.c4;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.channels.SocketChannel;
import java.nio.charset.Charset;

/**
 * @author: 王林博
 * @date: 2022年08月27日 10:55
 */

public class TestClient {
    public static void main(String[] args) throws IOException {
        SocketChannel channel = SocketChannel.open();

        channel.connect(new InetSocketAddress("localhost",8080));
        channel.write(Charset.defaultCharset().encode("123456789abcdefg"));
        System.in.read();

    }
}
